package com.example.JavaWebApi.core.commonmodel;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.Data;

import java.util.List;

/**
 * @program: cms_zjgs_api
 * @description: 分页模型类
 * @author: yang ze
 * @create: 2021-12-01 11:51
 */
@Data
public class PageModel<T> {
    private List<T> Data;
    private long totalCount;
    public PageModel(IPage<T> PageItem){
        setTotalCount(PageItem.getTotal());
        setData(PageItem.getRecords());
    }
}